#include<iostream>
using namespace std;
int main()
{
	int m, n;
	cin >> m >> n;
	int sum = 0;
	if (m % 17 != 0)
	{
		m += 17 - (m % 17);
	}
	//cout << m << endl;
	if (n % 17 != 0)
	{
		n -=(n % 17);
	}
	//cout << n << endl;
	int num = (n - m) / 17 + 1;
	sum = num * (n + m) / 2;
	cout << sum;
	return 0;
}